<?php


class EmsDownloadSectionTable extends Doctrine_Table
{
    static public $conditions = array(
        'free'    => 'Libre',
        'register' => 'Registro',
        'code'   => 'Código',
    );

    public function getConditions()
    {
        return self::$conditions;
    }

    public function getSupportedContentTypes()
    {
        $downloadtype = Doctrine::getTable('EmsSectionType')->findOneByType('Download');
        
        return $downloadtype->getAdmits();
    }

    public function getContentTypeOptions()
    {
        $options  = array();

        foreach ($this->getSupportedContentTypes() as $type) {
            $options[$type->getId()] = $type;
        }

        return $options;
    }

    public static function getInstance()
    {
        return Doctrine_Core::getTable('EmsDownloadSection');
    }
}